package com.zck.thumbup.service.impl;

import com.zck.thumbup.constant.UserConstant;
import com.zck.thumbup.entity.User;
import com.zck.thumbup.mapper.UserMapper;
import com.zck.thumbup.service.UserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zhaochenkang
 * @since 2025-10-16
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {

    @Override
    public User getLoginUser(HttpServletRequest request) {
        return  (User)request.getSession().getAttribute(UserConstant.LOGIN_USER_SESSION_KEY);
    }
}
